package system

import (
	"gin-sns/app/ginframe/response"

	"github.com/gin-gonic/gin"
)

var ErrorController = newErrorController()

func newErrorController() *errorController {
	return &errorController{}
}

type errorController struct {
}

func (c *errorController) Unauth(ctx *gin.Context) {
	response.BuildTpl(ctx, "error/unauth").WriteTpl()
}

func (c *errorController) Error(ctx *gin.Context) {
	response.BuildTpl(ctx, "error/500").WriteTpl()
}

func (c *errorController) NotFound(ctx *gin.Context) {
	response.BuildTpl(ctx, "error/404").WriteTpl()
}
